From: Georges Basile Stavracas Neto Date: Tue, 21 Aug 2018 10:13:30 +0000 (-0300) Subject: layoutManager: Subclass GObject.Object X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~91 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=dd225713a1d8a6fb19b71220ebf82361ca5eb6f6;p=gnome-shell.git layoutManager: Subclass GObject.Object LayoutManager is currently a pure JavaScript class that relies on the rudimentary Signals.addSignalMethods() to handle signals. This is an inefficient implementation of one of the most central classes in GNOME Shell. In addition to removing Shell.GenericContainer, then, turn LayoutManager into a proper GObject.Object subclass. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/153 --- diff --git a/js/ui/layout.js b/js/ui/layout.js index c379e7863..6c7e934db 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -177,8 +177,16 @@ const defaultParams = { var LayoutManager = new Lang.Class({ Name: 'LayoutManager', + Extends: GObject.Object, + Signals: { 'hot-corners-changed': {}, + 'startup-complete': {}, + 'startup-prepared': {}, + 'monitors-changed': {}, + 'keyboard-visible-changed': { param_types: [GObject.TYPE_BOOLEAN] } }, _init() { + this.parent(); + this._rtl = (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL); this.monitors = []; this.primaryMonitor = null; @@ -1069,7 +1077,6 @@ var LayoutManager = new Lang.Class({ this._queueUpdateRegions(); }, }); -Signals.addSignalMethods(LayoutManager.prototype); // HotCorner: